import Vue from "vue";
import { getOrderStatus } from './global'
Vue.filter('orderStatus', function (v) {
  switch (v) {
    case -1:
      return '待提交'
    case 0:
      return '未发货'
    case 1:
      return '已发货'
    case 2:
      return '已签收'
    case 3:
      return '已完成未入库'
    case 4:
      return '已评价'
    case 5:
      return '已完成已入库'
    case 6:
      return '已取消'
    case 7:
      return '已取消'
  }
})

Vue.filter('orderType', function (v) {
  switch (v) {
    case 10:
      return '搭配师'
    case 20:
      return '导购'
    case 30:
      return '有搭'
    case 40:
      return '预售'
  }
})
Vue.filter('askStatus', function (v) {
  switch (v) {
    case 0:
      return '待搭配'
    case 1:
      return '已搭配'
    case 2:
      return '已取消'
  }
})
Vue.filter('contactType', function (v) {
  switch (v) {
    case 0:
      return '不联系'
    case 1:
      return '电话'
    case 2:
      return '微信'

  }
})
Vue.filter('placleOrder', function (v) {
  switch (v) {
    case 1:
      return '搭配师搭盒'
    case 2:
      return '导购搭盒'
    case 3:
      return '主动要盒'
    default:
      return '-'
  }
})
Vue.filter('orderLogStatus', function (v) {
  switch (v) {
    case -1:
      return '未提交'
    case 0:
      return '未发货'
    case 1:
      return '已发货'
    case 2:
      return '已签收'
    case 3:
      return '已购买'
    case 4:
      return '申请退货'
    case 5:
      return '已退货'
    case 6:
      return '手动完成'
    case 7:
      return ''
  }
})
Vue.filter('fashionerType', function (v) {
  let text = parseInt(v)
  if (text == 1) {
    return '导购'
  } else if (text == 0) {
    return '搭配师'
  } else {
    return ''
  }
})
